package com.hxw.schema.factory.simpleFactory;

import com.hxw.schema.factory.Operation;

/**
 * Created by Think on 2018/5/4.
 */
public class SimpleFactory {
    public static Operation createOperation(char oper){
        Operation operation = null;
        switch (oper){
            case '+':
                return new AddOperator();
            case '-':
                return new SubOperator();
        }
        return operation;
    }

}
